#include <vtkColorTransferFunction.h>
#include <vtkNew.h>

#include "vtkColor.h"

int main(int, char*[])
{
    vtkNew<vtkColorTransferFunction> colorTransferFunction;

//    colorTransferFunction->AddRGBPoint(0.0, 1, 0, 0);
//    colorTransferFunction->AddRGBPoint(10.0, 0, 1, 0);

    double color0[3] = {13.0, 0, 198.0};
    double color1[3] = {0, 9.0, 1};
    double color2[3] = {0, 182.0, 1};
    double color3[3] = {0, 51.0, 1};
    double color4[3] = {0, 1, 149.0};
    double color5[3] = {1, 46.0, 0};
    double color6[3] = {201.0, 0, 0};
    colorTransferFunction->AddRGBPoint(0.0, color0[0], color0[1], color0[2]);
    colorTransferFunction->AddRGBPoint(8.0, color1[0], color1[1], color1[2]);
    colorTransferFunction->AddRGBPoint(16.0, color2[0], color2[1], color2[2]);
    colorTransferFunction->AddRGBPoint(24.0, color3[0], color3[1], color3[2]);
    colorTransferFunction->AddRGBPoint(32.0, color4[0], color4[1], color4[2]);
    colorTransferFunction->AddRGBPoint(40.0, color5[0], color5[1], color5[2]);
    colorTransferFunction->AddRGBPoint(48.0, color6[0], color6[1], color6[2]);


//    colorTransferFunction->AddRGBPoint(0, 1, 0, 0);
//    colorTransferFunction->AddRGBPoint(64, 1.0, 0.52, 0.3);
//    colorTransferFunction->AddRGBPoint(190.0, 1.00, 1.00, 1.00);
//    colorTransferFunction->AddRGBPoint(220.0, 0.20, 0.20, 0.20);

//    colorTransferFunction->AddHSVSegment(0, 1, 0, 0, 1, 0, 1, 0);
//    colorTransferFunction->Build();

    double color01[3];
    colorTransferFunction->GetColor(0.0, color01);
    std::cout << color0[0] << " " << color01[1] << " " << color01[2] << std::endl;

    double color[3];
    colorTransferFunction->GetColor(1.0, color);
    std::cout << color[0] << " " << color[1] << " " << color[2] << std::endl;

    colorTransferFunction->GetColor(50.0, color);
    std::cout << color[0] << " " << color[1] << " " << color[2] << std::endl;

    return EXIT_SUCCESS;
}